let {PORT, SUCCESS_RESPONSE} = require('../config/index')
const executeSql = require("../utils/query");
exports.getLogoInfo = async () => {
    let sql = 'select logo_title,logo_img from setting'
    let data = await executeSql(sql)
    data[0].logo_img = `http://127.0.0.1:${PORT}/` + data[0].logo_img
    return data[0]
}

exports.updateLogoImg = async (logo_img) => {
    let sql = `update setting set logo_img='${logo_img}' where id = 1`
    return await  executeSql(sql)
}

exports.updateLogoTitle = async (logo_title) => {
    let sql = `update setting set logo_title='${logo_title}' where id = 1`
    return await  executeSql(sql)
}